﻿// Study0905.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
// 第九章 群体数据 链表类

#include <iostream>
#include "LinkedList.h"
using namespace  std;
int main()
{
    LinkedList<int> list;

    for (int i = 0; i < 10; ++i)
    {
        int item;
        cin >> item;
        list.insertFront(item);
    }

    cout << "List:";
    list.reset();
    while (!list.endofList())
    {
        cout << list.data() << " ";
        list.next();
    }
    cout << endl;

    int key;
    cout << "输入需要删除的整数:";
    cin >> key;

    list.reset();
    while (!list.endofList())
    {
        cout << list.data() << " ";
        list.next();
    }
    cout << endl;

    return 0;
}


